﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

/// <summary>
/// Summary description for Products
/// </summary>
public class Products
{
    public int Product_id { get; set; }
    public string Model { get; set; }
    public string Url { get; set; }
    public int Category_id { get; set; }
    
    public DateTime DateStart { get; set; }
    public DateTime DateUpdate { get; set; }
    public string Tag { get; set; }
    public bool Status { get; set; }
    public float Price_input { get; set; }
    public float Price_output { get; set; }
    public int Baohanh_id { get; set; }
    public int View { get; set; }
    public bool Top { get; set; }
    public int AddressBaohanh_id { get; set; }
    public int Quantity { get; set; }
    public string Tinhnangnoibat { get; set; }
    public string Trangthaiphathanh { get; set; }
    public string Ngaycongbo { get; set; }
    public string Ngayphathanh { get; set; }
    public string Bangtan { get; set; }
    public string Chieudai { get; set; }
    public string Chieurong { get; set; }
    public string Chieucao { get; set; }
    public string Cannang { get; set; }
    public string Kieumanhinh { get; set; }
    public string Kichthuocmanhinh { get; set; }
    public string Dophangiai { get; set; }
    public string Camung { get; set; }
    public string Tinhnangkhac { get; set; }
    public string Tinnhan { get; set; }
    public string Jackcam { get; set; }
    public string Tainhacchuong { get; set; }
    public string Loangoai { get; set; }
    public string Danhbaluutru { get; set; }
    public string Hotrosms { get; set; }
    public string Hotroemail { get; set; }
    public string Bonhotrong { get; set; }
    public string Dungluongthenho { get; set; }
    public string Loaithenho { get; set; }
    public string Gprs { get; set; }
    public string Edge { get; set; }
    public string BaG { get; set; }
    public string Web { get; set; }
    public string Gps { get; set; }
    public string Bluetooth { get; set; }
    public string Wifi { get; set; }
    public string Hongngoai { get; set; }
    public string Usb { get; set; }
    public string Mayanhchinh { get; set; }
    public string Mayanhkhac { get; set; }
    public string Mayanhphu { get; set; }
    public string Quayphim { get; set; }
    public string Nghenhac { get; set; }
    public string Xemphim { get; set; }
    public string Radio { get; set; }
    public string Tivi { get; set; }
    public string Ketnoitivi { get; set; }
    public string Ghiam { get; set; }
    public string Luutrucuocgoi { get; set; }
    public string Ungdungvanphong { get; set; }
    public string Ungdungkhac { get; set; }
    public string Trochoi { get; set; }
    public string Hotrosim { get; set; }
    public string Hotrojava { get; set; }
    public string Kieudang { get; set; }
    public string Hedieuhanh { get; set; }
    public string Phienbanhedieuhanh { get; set; }
    public string Cpu { get; set; }
    public string Ram { get; set; }
    public string Ngonngu { get; set; }
    public string Qwerty { get; set; }
    public string Hotromang { get; set; }
    public string Loaipin { get; set; }
    public string Thoigiancho2g { get; set; }
    public string Thoigiancho3g { get; set; }
    public string Damthoai2g { get; set; }
    public string Damthoai3g { get; set; }
    public string Dungluongpin { get; set; }
    public string Image { get; set; }
    public string Description { get; set; }
    
	public Products()
	{
	    this.Price_input = 0;
	    this.Price_output = 0;
	    this.Product_id = 0;
	    this.Model = "";
	    this.Url = "";
	    this.Category_id = 0;
	    
	    this.DateStart = DateTime.Now;
	    this.DateUpdate = DateTime.Now;
	    this.Tag = "";
	    this.Status = true;
	    this.Baohanh_id = 0;
	    this.View = 0;
	    this.Top = true;
	    this.AddressBaohanh_id = 0;
	    this.Quantity = 1;
	    this.Tinhnangnoibat = "";
	    this.Trangthaiphathanh = "";
	    this.Ngaycongbo = "";
	    this.Ngayphathanh = "";
	    this.Bangtan = "";
	    this.Chieudai = "";
	    this.Chieurong = "";
	    this.Chieucao = "";
	    this.Cannang = "";
	    this.Kieumanhinh = "";
	    this.Kichthuocmanhinh = "";
	    this.Dophangiai = "";
	    this.Camung = "";
	    this.Tinhnangkhac = "";
	    this.Tinnhan = "";
	    this.Jackcam = "";
	    this.Tainhacchuong = "";
	    this.Loangoai = "";
	    this.Danhbaluutru = "";
	    this.Hotrosms = "";
	    this.Hotroemail = "";
	    this.Bonhotrong = "";
	    this.Dungluongthenho = "";
	    this.Loaithenho = "";
	    this.Gprs = "";
	    this.Edge = "";
	    this.BaG = "";
	    this.Web = "";
	    this.Gps = "";
	    this.Bluetooth = "";
	    this.Wifi = "";
	    this.Hongngoai = "";
	    this.Usb = "";
	    this.Mayanhchinh = "";
	    this.Mayanhkhac = "";
	    this.Mayanhphu = "";
	    this.Quayphim = "";
	    this.Nghenhac = "";
	    this.Xemphim = "";
	    this.Radio = "";
	    this.Tivi = "";
	    this.Ketnoitivi = "";
	    this.Ghiam = "";
	    this.Luutrucuocgoi = "";
	    this.Ungdungvanphong = "";
	    this.Ungdungkhac = "";
	    this.Trochoi = "";
	    this.Hotrosim = "";
	    this.Hotrojava = "";
	    this.Kieudang = "";
	    this.Hedieuhanh = "";
	    this.Phienbanhedieuhanh = "";
	    this.Cpu = "";
	    this.Ram = "";
	    this.Ngonngu = "";
	    this.Qwerty = "";
	    this.Hotromang = "";
	    this.Loaipin = "";
	    this.Thoigiancho2g = "";
	    this.Thoigiancho3g = "";
	    this.Damthoai2g = "";
	    this.Damthoai3g = "";
	    this.Dungluongpin = "";
        this.Image = "";
	    this.Description = "";
	}
    public Products(int Product_id,string image,string name,float price,int quantity) {
        this.Product_id = Product_id;
        this.Image = image;
        this.Model = name;
        this.Price_output = price;
        this.Quantity = quantity;
    }
    public Products(DataRow dr)
    {
        this.Product_id = Convert.ToInt32(dr[0].ToString());
        this.Model = dr[1].ToString();
        this.Url = dr[2].ToString();
        this.Category_id = Convert.ToInt32(dr[3].ToString());
        this.DateStart = DateTime.Parse(dr[4].ToString());
        if (dr[5].ToString() != null && dr[5].ToString()!="")
            this.DateUpdate = DateTime.Parse(dr[5].ToString());
        this.Tag = dr[6].ToString();
        this.Status = Boolean.Parse(dr[7].ToString());
        this.Price_input = Convert.ToSingle(dr[8].ToString());
        this.Price_output = Convert.ToSingle(dr[9].ToString());
        this.Baohanh_id = Convert.ToInt32(dr[10].ToString());
        this.View = Convert.ToInt32(dr[11].ToString());
        this.Top = Convert.ToBoolean(dr[12].ToString());
        this.AddressBaohanh_id = Convert.ToInt32(dr[13].ToString());
        this.Quantity = Convert.ToInt32(dr[14].ToString());
        this.Tinhnangnoibat = dr[15].ToString();
        this.Trangthaiphathanh = dr[16].ToString();
        this.Ngaycongbo = dr[17].ToString();
        this.Ngayphathanh = dr[18].ToString();
        this.Bangtan = dr[19].ToString();
        this.Chieudai = dr[20].ToString();
        this.Chieurong = dr[21].ToString();
        this.Chieucao = dr[22].ToString();
        this.Cannang = dr[23].ToString();
        this.Kieumanhinh = dr[24].ToString();
        this.Kichthuocmanhinh = dr[25].ToString();
        this.Dophangiai = dr[26].ToString();
        this.Camung = dr[27].ToString();
        this.Tinhnangkhac = dr[28].ToString();
        this.Tinnhan = dr[29].ToString();
        this.Jackcam = dr[30].ToString();
        this.Tainhacchuong = dr[31].ToString();
        this.Loangoai = dr[32].ToString();
        this.Danhbaluutru = dr[33].ToString();
        this.Hotrosms = dr[34].ToString();
        this.Hotroemail = dr[35].ToString();
        this.Bonhotrong = dr[36].ToString();
        this.Dungluongthenho = dr[37].ToString();
        this.Loaithenho = dr[38].ToString();
        this.Gprs = dr[39].ToString();
        this.Edge = dr[40].ToString();
        this.BaG = dr[41].ToString();
        this.Web = dr[42].ToString();
        this.Gps = dr[43].ToString();
        this.Bluetooth = dr[44].ToString();
        this.Wifi = dr[45].ToString();
        this.Hongngoai = dr[46].ToString();
        this.Usb = dr[47].ToString();
        this.Mayanhchinh = dr[48].ToString();
        this.Mayanhkhac = dr[49].ToString();
        this.Mayanhphu = dr[50].ToString();
        this.Quayphim = dr[51].ToString();
        this.Nghenhac = dr[52].ToString();
        this.Xemphim = dr[53].ToString();
        this.Radio = dr[54].ToString();
        this.Tivi = dr[55].ToString();
        this.Ketnoitivi = dr[56].ToString();
        this.Ghiam = dr[57].ToString();
        this.Luutrucuocgoi = dr[58].ToString();
        this.Ungdungvanphong = dr[59].ToString();
        this.Ungdungkhac = dr[60].ToString();
        this.Trochoi = dr[61].ToString();
        this.Hotrosim = dr[62].ToString();
        this.Hotrojava = dr[63].ToString();
        this.Kieudang = dr[64].ToString();
        this.Hedieuhanh = dr[65].ToString();
        this.Phienbanhedieuhanh = dr[66].ToString();
        this.Cpu = dr[67].ToString();
        this.Ram = dr[68].ToString();
        this.Ngonngu = dr[69].ToString();
        this.Qwerty = dr[70].ToString();
        this.Hotromang = dr[71].ToString();
        this.Loaipin = dr[72].ToString();
        this.Thoigiancho2g = dr[73].ToString();
        this.Thoigiancho3g = dr[74].ToString();
        this.Damthoai2g = dr[75].ToString();
        this.Damthoai3g = dr[76].ToString();
        this.Dungluongpin = dr[77].ToString();
        this.Image = dr[78].ToString();
        this.Description = dr[79].ToString();
    }
}